package com.lantosec.hmrp.modules.supplier.vo;

import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.supplier.entity.SupplierInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 供应商信息 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SupplierInfo对象", description="供应商信息")
public class SupplierInfoVO extends BaseVO<SupplierInfo> {
    private static final long serialVersionUID = 1L;


    public SupplierInfoVO(SupplierInfo entity){
        this.supplierCode = entity.getSupplierCode();
        this.supplierName = entity.getSupplierName();
        this.supplierProvince = entity.getSupplierProvince();
        this.supplierCity = entity.getSupplierCity();
        this.supplierType = entity.getSupplierType();
        this.supplierNature = entity.getSupplierNature();
        this.supplierIndustry = entity.getSupplierIndustry();
        this.supplierScale = entity.getSupplierScale();
        this.linkmanId = entity.getLinkmanId();
        this.createTime = entity.getCreateTime();
        this.createDeptId = entity.getCreateDeptId();
        this.createDeptName = entity.getCreateDeptName();
        this.createUserId = entity.getCreateUserId();
        this.createUser = entity.getCreateUser();
        this.businessLicense = entity.getBusinessLicense();
        this.uscc = entity.getUscc();
        this.businessName = entity.getBusinessName();
        this.businessBegin = entity.getBusinessBegin();
        this.businessEnd = entity.getBusinessEnd();
        this.businessScope = entity.getBusinessScope();
        this.businessAddress = entity.getBusinessAddress();
        this.legalRepresentative = entity.getLegalRepresentative();
        this.blacklistFlag = entity.getBlacklistFlag();
        this.entryState = entity.getEntryState();
        this.username = entity.getUsername();
        this.phone = entity.getPhone();
    }

    @Override
    public SupplierInfo convertToEntity(){
        return new SupplierInfo(this);
    }


    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "省份")
    private String supplierProvince;

    @ApiModelProperty(value = "城市")
    private String supplierCity;

    @ApiModelProperty(value = "供应商类型，字典表ID集合")
    private String supplierType;

    @ApiModelProperty(value = "供应商性质，字典表ID")
    private String supplierNature;

    @ApiModelProperty(value = "供应商所属行业，字典表ID集合")
    private String supplierIndustry;

    @ApiModelProperty(value = "供应商规模，字典表ID集合")
    private String supplierScale;

    @ApiModelProperty(value = "联系人ID")
    private String linkmanId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建部门ID")
    private String createDeptId;

    @ApiModelProperty(value = "创建部门名称")
    private String createDeptName;

    @ApiModelProperty(value = "创建用户ID")
    private String createUserId;

    @ApiModelProperty(value = "创建用户名称")
    private String createUser;

    @ApiModelProperty(value = "营业执照附件ID")
    private String businessLicense;

    @ApiModelProperty(value = "统一社会信用代码")
    private String uscc;

    @ApiModelProperty(value = "营业执照名称")
    private String businessName;

    @ApiModelProperty(value = "营业执照开始日期(yyyy-MM-dd)")
    private String businessBegin;

    @ApiModelProperty(value = "营业执照结束日期(yyyy-MM-dd或常期)")
    private String businessEnd;

    @ApiModelProperty(value = "经营范围")
    private String businessScope;

    @ApiModelProperty(value = "经营地址")
    private String businessAddress;

    @ApiModelProperty(value = "法定代表人")
    private String legalRepresentative;

    @ApiModelProperty(value = "是否拉入黑名单(0否,1是)")
    private Boolean blacklistFlag;

    @ApiModelProperty(value = "供应商类型所对应的名称")
    private String supplierTypeName;

    @ApiModelProperty(value = "供应商性质所对应的名称")
    private String supplierNatureName;

    @ApiModelProperty(value = "供应商所属行业对应的名称")
    private String supplierIndustryName;

    @ApiModelProperty(value = "供应商规模对应的名称")
    private String supplierScaleName;

    @ApiModelProperty(value = "供应商联系人头衔")
    private String linkmanTitle;

    @ApiModelProperty(value = "供应商联系人姓名")
    private String linkmanName;

    @ApiModelProperty(value = "供应商联系人电话")
    private String linkmanTel;

    @ApiModelProperty(value = "供应商准入ID")
    private String entryId;

    @ApiModelProperty(value = "准入状态(0正常1未审核2审核中3过期4停用)")
    private int entryState;

    @ApiModelProperty(value = "文件保存路径")
    private String savePath;

    @ApiModelProperty(value = "供应商联系人姓名")
    private String username;

    @ApiModelProperty(value = "供应商联系人电话")
    private String phone;

    @ApiModelProperty(value = "处置状态名称")
    private String handleStateName;
}
